Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: anchor系コンポーネントがtarget属性を持つ場合、rel属性を自動設定する #4720

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

AtsushiM
Copy link
Member

@AtsushiM AtsushiM commented Jun 13, 2024

Related URL

Overview

What I did

  • anchorのrel属性はセキュリティに係るものであるため、可能な限り安全にしたい
  • target=_blankの場合、自動でrel属性にnoopener, noreffererを設定する
  • 明示的にrel属性が設定されている場合はそちらを優先する

Capture

Copy link
Contributor

@oti oti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

nitsで、rel属性を明示したパターンがStorybookにあってもいいような気もしたましたが、Storybookの役割じゃないと思ったのでapproveです〜

@AtsushiM AtsushiM marked this pull request as ready for review June 14, 2024 01:19
@AtsushiM AtsushiM requested a review from a team as a code owner June 14, 2024 01:19
@AtsushiM AtsushiM requested review from Qs-F and nabeliwo and removed request for a team June 14, 2024 01:19
@AtsushiM AtsushiM merged commit 46e4200 into master Jun 14, 2024
10 checks passed
@AtsushiM AtsushiM deleted the feat-add-noopener-and-noreferrer-for-anchor branch June 14, 2024 01:19
@AtsushiM AtsushiM restored the feat-add-noopener-and-noreferrer-for-anchor branch June 14, 2024 01:19
@AtsushiM AtsushiM deleted the feat-add-noopener-and-noreferrer-for-anchor branch June 14, 2024 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants